home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / PropertyResourceBundle.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.2 KB  |  40 lines

  1. package java.util;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5. import java.io.Reader;
  6. import sun.util.ResourceBundleEnumeration;
  7.  
  8. public class PropertyResourceBundle extends ResourceBundle {
  9.    private Map<String, Object> lookup;
  10.  
  11.    public PropertyResourceBundle(InputStream var1) throws IOException {
  12.       Properties var2 = new Properties();
  13.       var2.load(var1);
  14.       this.lookup = new HashMap(var2);
  15.    }
  16.  
  17.    public PropertyResourceBundle(Reader var1) throws IOException {
  18.       Properties var2 = new Properties();
  19.       var2.load(var1);
  20.       this.lookup = new HashMap(var2);
  21.    }
  22.  
  23.    public Object handleGetObject(String var1) {
  24.       if (var1 == null) {
  25.          throw new NullPointerException();
  26.       } else {
  27.          return this.lookup.get(var1);
  28.       }
  29.    }
  30.  
  31.    public Enumeration<String> getKeys() {
  32.       ResourceBundle var1 = this.parent;
  33.       return new ResourceBundleEnumeration(this.lookup.keySet(), var1 != null ? var1.getKeys() : null);
  34.    }
  35.  
  36.    protected Set<String> handleKeySet() {
  37.       return this.lookup.keySet();
  38.    }
  39. }
  40.